package com.kris.dev2;

import java.util.Set;
import java.util.TreeMap;

/**
 * 	treeMap 按照key 值排序
 */
public class TreeMapClass {
	
	public static void main(String[] args) {
		TreeMap<String, Object> tree = new TreeMap<String, Object>();
		
		tree.put("1","jack");
		tree.put("4","tom");
		tree.put("3","jerry");
		tree.put("2","tony");
		
		Set set = tree.keySet();
		System.out.println(set);
		
		set = tree.entrySet();
		System.out.println(set);
		
		
		
	}

}
